<template>
  <div class="content">
    <div class="order-container">
      <div class="goods-container">
        <div class="goods">推送商品</div>
        <div class="account">
          <div class="txt">请选择您要推送的主账号：</div>
          <el-select v-model="value" placeholder="请选择主账号" class="select">
            <el-option
              v-for="item in options"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            />
          </el-select>
        </div>
      </div>
      <div class="address-container">
        <div class="address-title">
          <div class="address-user">
            <img src="../../../assets/images/address.png" alt>
            <div class="txt">收货人信息</div>
          </div>
          <div class="add-address" @click="addAddress">+ 新增收货地址</div>
        </div>
        <div class="address-list" :class="{ close: isClose }">
          <div class="address-item">
            <div class="address-info">
              <div class="address-detail">
                <div class="user">
                  <div class="circle">
                    <span />
                  </div>
                  <span>张三</span>
                </div>
                <div class="phone">13800138000</div>
                <div class="address-name">广东 广州 天河区棠下街道市场北</div>
                <div class="default-address">默认地址</div>
              </div>
              <div class="address-edit">
                <div class="default-edit">【设置为默认地址】</div>
                <span class="edit-address">修改</span>
                <span class="del-address">删除</span>
              </div>
            </div>
          </div>
          <div class="address-item">
            <div class="address-info">
              <div class="address-detail">
                <div class="user">
                  <div class="circle">
                    <span />
                  </div>
                  <span>张三</span>
                </div>
                <div class="phone">13800138000</div>
                <div class="address-name">广东 广州 天河区棠下街道市场北</div>
                <div class="default-address">默认地址</div>
              </div>
              <div class="address-edit">
                <div class="default-edit">【设置为默认地址】</div>
                <span class="edit-address">修改</span>
                <span class="del-address">删除</span>
              </div>
            </div>
          </div>
        </div>
        <div class="close-address" @click="closeAddress">
          <span>收起收货地址</span>

          <i class="el-icon-d-arrow-right" :class="{ rotate: isRotate }" />
        </div>
      </div>
      <div class="goods-info">
        <div>商品信息</div>
        <div>单价 (元)</div>
        <div>数量</div>
        <div>小计 (元)</div>
        <div>操作</div>
      </div>
      <div class="monopoly-container">
        <div class="title">
          <img src="../../../assets/images/shop.png" alt>
          <div>仪器仪表专卖</div>
        </div>
        <div class="goods-list">
          <div class="goods-item">
            <img src="../../../assets/images/steel.png" alt>
            <div class="item-info">
              <div class="name">钢管</div>
              <div class="mark">标 号：外16内6.03</div>
              <div class="mark">标 号：外16内6.03</div>
              <div class="mark">标 号：外16内6.03</div>
            </div>
            <div class="price">58.00</div>
            <!-- <div class="numble">
              <span class="comment">-</span>
              <span>1</span>
              <span class="comment">+</span>
            </div>-->
            <div class="numble">
              <el-input-number
                v-model="num"
                :min="1"
                @change="handleChange"
              />
            </div>

            <div class="total-prices">58.00</div>
            <div class="del-goods" @click="delGoodes">删除</div>
          </div>
        </div>
      </div>
      <div class="money-container">
        <div class="money-details">
          <div class="total-money">2件商品，总商品金额：￥116.00</div>
          <div class="transportation">运输里程：200.00km</div>
          <div class="transportation-money">
            <span>运费总价：</span>
            <span class="all-money" @click="toFreight">￥20.00></span>
          </div>
        </div>
        <div class="total-money">店铺合计：￥116.00</div>
      </div>
      <div class="push-container">
        <div class="push-num">
          <span>共4件，合计：</span>
          <span>￥166.00</span>
        </div>
        <div class="push-confirt">确定推送</div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      options: [
        {
          value: '选项1',
          label: '黄金糕'
        },
        {
          value: '选项2',
          label: '双皮奶'
        },
        {
          value: '选项3',
          label: '蚵仔煎'
        },
        {
          value: '选项4',
          label: '龙须面'
        },
        {
          value: '选项5',
          label: '北京烤鸭'
        }
      ],
      value: '',
      isRotate: false,
      isClose: false,
      num: 1
    }
  },
  methods: {
    handleChange(value) {
      console.log(value)
    },
    closeAddress() {
      this.isRotate = !this.isRotate
      this.isClose = !this.isClose
    },
    delGoodes() {
      console.log('删除')
    },
    toFreight() {
      // console.log('去运费详情页面')
      // this.$router.push('/')
      this.$router.push({
        path: '/prepaid'
      })
    },
    addAddress() {
      console.log('addAddress')
      this.$emit('addAddress')
    }
  }
}
</script>

<style scoped lang="scss">
::v-deep .el-select {
  margin-bottom: 20px !important;
}
::v-deep .el-select .el-input__inner{
 height: 30px !important;
}
.content {
  background-color: #f7f7f7;
}
.order-container {
  width: 1200px;
  margin: 0 auto;
  overflow: hidden;
  padding: 33px 0 60px 0;
  .goods-container {
    margin-bottom: 20px;
    .goods {
      font-size: 16px;
      font-weight: 700;
      height: 58px;
      line-height: 58px;
      border-bottom: 3px solid #e5e5e5;
      background-color: #fff;
      padding: 0 18px;
    }
    .account {
      padding: 0 18px;
      background-color: #fff;
      .txt {
        height: 50px;
        line-height: 50px;
      }
      .select {
        width: 164px;

        ::v-deep .el-input {
          width: 164px;
          height: 30px !important;
          ::v-deep .el-input__inner {
            height: 30px !important;
            width: 164px;
          }
        }
        ::v-deep .el-input__icon{
line-height: 30px;
        }
      }
    }
  }
  .address-container {
    margin-bottom: 30px;
    .address-title {
      padding: 0 18px;
      height: 44px;
      display: flex;
      justify-content: space-between;
      align-items: center;
      background-color: #ff3b30;
      color: #fff;
      .address-user {
        display: flex;
        justify-content: center;
        align-items: center;
        img {
          width: 20px;
          height: 20px;
          margin-right: 10px;
        }
      }
      .add-address {
        width: 120px;
        height: 26px;
        background-color: #fff;
        display: flex;
        justify-content: center;
        align-items: center;
        color: #6b6b6b;
      }
      .add-address:hover {
        cursor: pointer;
      }
    }
    .address-list {
      .address-item {
        padding: 0 21px;
        background-color: #fff;
        .address-info {
          display: flex;
          align-items: center;
          justify-content: space-between;
          border-bottom: 1px dashed #e5e5e5;
          height: 44px;
          .address-detail {
            display: flex;
            align-items: center;
            justify-content: center;
            .user {
              display: flex;
              align-items: center;
              justify-content: center;
              margin-right: 28px;
              .circle {
                width: 10px;
                height: 10px;
                border-radius: 5px;
                border: 2px solid #ff3b30;
                margin-right: 10px;
              }
            }
            .address-name {
              margin: 0 16px;
            }
            .default-address {
              width: 70px;
              height: 22px;
              border-radius: 11px;
              background-color: #ff3b30;
              display: flex;
              align-items: center;
              justify-content: center;
              color: #fff;
              font-size: 12px;
            }
          }
          .address-edit {
            display: flex;
            font-size: 12px;
            .default-edit {
              color: #6b6b6b;
            }
            span {
              color: #02a9f1;
            }

            span:hover {
              cursor: pointer;
            }
            .edit-address {
              margin: 0 10px;
            }
          }
        }
      }
      .address-item:nth-child(1) {
        background-color: rgba(255, 244, 243, 0.5);
        border: 1px solid #ff3b30;
        .address-info {
          border: 0;
        }
      }
    }
    div.close {
      height: 46px;
      background-color: #fff;
      overflow: hidden;
    }
    .close-address {
      padding: 0 21px;
      height: 44px;
      color: #6b6b6b;
      font-size: 12px;
      background-color: #fff;
      line-height: 44px;

      .el-icon-d-arrow-right {
        transform: rotate(-90deg);
        color: #c8c8c8;
      }
      i.rotate {
        transform: rotate(90deg);
      }
    }
    .close-address {
      cursor: pointer;
    }
  }
  .goods-info {
    margin-bottom: 10px;
    height: 44px;
    background-color: #fff;
    display: flex;
    align-items: center;
    line-height: 44px;
    div:nth-child(1) {
      margin-left: 20px;
    }
    div:nth-child(2) {
      margin-left: 590px;
    }
    div:nth-child(3) {
      margin: 0 104px;
    }
    div:nth-child(5) {
      margin-left: 67px;
    }
  }
  .monopoly-container {
    // padding: ;
    .title {
      padding-left: 20px;
      display: flex;
      align-items: center;
      line-height: 47px;
      height: 47px;
      background-color: #fff;
      border-bottom: 1px solid #e5e5e5;
      img {
        width: 15px;
        height: 15px;
        margin-right: 5px;
      }
    }
    .goods-list {
      padding: 18px 20px;
      background-color: #fff;
      border-bottom: 3px solid #e5e5e5;
      .goods-item {
        display: flex;
        align-items: center;
        margin-bottom: 14px;
        img {
          width: 83px;
          height: 83px;
          object-fit: cover;
          margin-right: 30px;
        }
        .item-info {
          height: 83px;

          .mark {
            font-size: 12px;
            color: #a7a7aa;
          }
        }
        .price {
          margin-left: 442px;
        }
        .numble {
          margin: 0 103px;
          ::v-deep .el-input-number {
            display: flex;
            width: 68px;
          }
          ::v-deep .el-input-number__decrease {
            width: 17px;
            height: 17px;
            display: flex;
            justify-content: center;
            align-items: center;
            border-right: 1px solid #dcdfe6;
               top: 1px;
            left: 5px;
          }
          ::v-deep .el-input-number__increase {
          width: 17px;
            height: 17px;
            display: flex;
            justify-content: center;
           top: 1px;
            right: 5px;
            align-items: center;
            border-left: 1px solid #dcdfe6;
          }
          ::v-deep .el-input {
            width: 60px;
            height: 21px !important;
            left: 4px;
            // z-index: 100;
          }
          ::v-deep .el-input__inner {
            display: flex;
            width: 60px;
            padding: 0;
            justify-content: center;
            align-items: center;
            height: 19px !important;
            color: #8e8e93;

            border-radius: 0;
          }
          // .comment {
          //   display: flex;
          //   justify-content: center;
          //   align-items: center;
          //   width: 19px;
          //   height: 19px;
          //   color: #8e8e93;
          //   border: 1px solid #f4f5f7;
          //   background-color: #f5f7fa;
          // }
          // span:nth-child(2) {
          //   width: 30px;
          //   height: 19px;
          //   border: 1px solid #f4f5f7;
          //   display: flex;
          //   justify-content: center;
          //   align-items: center;
          //   color: #8e8e93;
          // }
        }
        .del-goods {
          color: #02a9f1;
          margin-left: 84px;
        }
        .del-goods:hover {
          cursor: pointer;
        }
      }
      .goods-item:last-child {
        margin-bottom: 0;
      }
    }
  }
  .money-container {
    margin-bottom: 20px;
    height: 90px;
    padding: 18px 20px;
    display: flex;
    background-color: #fff;
    align-items: flex-end;
    justify-content: space-between;
    flex-direction: column;
    color: #6b6b6b;
    .money-details {
      display: flex;
      .transportation {
        margin: 0 25px;
      }
      .transportation-money {
        .all-money {
          color: #02a9f1;
        }
        .all-money:hover {
          cursor: pointer;
        }
      }
    }
  }
  .push-container {
    height: 120px;
    padding: 20px;
    display: flex;
    background-color: #fff;
    align-items: flex-end;
    justify-content: space-between;
    flex-direction: column;
    .push-num {
      span:nth-child(2) {
        font-size: 18px;
        color: #ff3b30;
        font-weight: 700;
      }
    }
    .push-confirt {
      width: 110px;
      height: 37px;
      background-color: #ff3b30;
      font-size: 16px;
      color: #fff;
      display: flex;
      justify-content: center;
      align-items: center;
    }
  }
}
</style>
